# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.
#
# AUR Maintainer: Malachi Soord <me@malachisoord.com>

pkgname=monsoon
pkgver=261.f4f9852
pkgrel=2
pkgdesc='A fast HTTP enumerator that allows you to execute a large number of HTTP requests.'
arch=('x86_64')
groups=('blackarch' 'blackarch-webapp')
url='https://github.com/RedTeamPentesting/monsoon'
license=('MIT')
makedepends=('git' 'go')
source=("git+https://github.com/RedTeamPentesting/$pkgname.git")
sha512sums=('SKIP')

build() {
  cd $pkgname

  GOPATH="$srcdir" go mod download
  GOPATH="$srcdir" go build \
    -trimpath \
    -buildmode=pie \
    -mod=readonly \
    -modcacherw \
    -ldflags "-s -w" \
    -o $pkgname .
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
}

